<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="AssetLibrary,camo.models.libraries.AssetLibrary,PRELOAD_DONE,PRELOAD_NEXT,data,imagePath,pages,template,addListeners,clone,getAsset,getItem,getPage,hasAsset,init,ioError,load,loadPage,onSheetLoad,preload,register,removeListeners,replaceItemData" name="keywords">
<title>camo.models.libraries.AssetLibrary</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'AssetLibrary - My Application';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?camo/models/libraries/AssetLibrary.html&amp;camo/models/libraries/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;AssetLibrary</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class AssetLibrary"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">camo.models.libraries</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AssetLibrary</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AssetLibrary <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="ILibrary.html">ILibrary</a></td>
</tr>
</table>
<p></p>
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#data">data</a> : Dictionary<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#imagePath">imagePath</a> : String<div class="summaryTableDescription">
   <p>Returns the imagePath if set.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#pages">pages</a> : Dictionary<div class="summaryTableDescription">[read-only]
   <p>This returns the dictionary with references for all of 
   the pages loaded into the AssetLibrary.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#template">template</a> : <a href="../../data/AssetData.html">AssetData</a>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#AssetLibrary()">AssetLibrary</a>(newData:XML = null)</div>
<div class="summaryTableDescription">
   <p>This class represents the physical decal sheet once it is loaded in.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addListeners()">addListeners</a>(target:LoaderInfo):void</div>
<div class="summaryTableDescription">
   <p>attaches listeners to LoaderInfo.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clone()">clone</a>():<a href="../libraries/ILibrary.html">ILibrary</a>
</div>
<div class="summaryTableDescription">
   <p>This function is not available in the AssetLibrary.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getAsset()">getAsset</a>(id:String):<a href="../../views/display/CamoAsset.html">CamoAsset</a>
</div>
<div class="summaryTableDescription">
   Returns a cut out decal based on id.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getItem()">getItem</a>(name:String):*</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getPage()">getPage</a>(name:String, clone:Boolean = false):Bitmap</div>
<div class="summaryTableDescription">
   Used to get a cloned bitmap reference to the page's ID.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#hasAsset()">hasAsset</a>(id:String):Boolean</div>
<div class="summaryTableDescription">
   Verifies that the Asset Exists in the AssetLibrary instance.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#init()">init</a>(event:Event):void</div>
<div class="summaryTableDescription">
   init function creates a new page dictionary, resets the preloader counter and gets the
   total pages to load before calling preload.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ioError()">ioError</a>(event:IOErrorEvent):void</div>
<div class="summaryTableDescription">
   <p>Called when a file can not be loaded.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#load()">load</a>(url:String):void</div>
<div class="summaryTableDescription">
   Routs load call to template instance inside of class.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#loadPage()">loadPage</a>(url:String):void</div>
<div class="summaryTableDescription">
   Loads a decal sheet page based on its url.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#onSheetLoad()">onSheetLoad</a>(event:Event):void</div>
<div class="summaryTableDescription">
   This is called when page is loaded.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#preload()">preload</a>():void</div>
<div class="summaryTableDescription">
   begins preload by seeing if the counter is lower then the total pages to load.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#register()">register</a>(name:String, item:*):*</div>
<div class="summaryTableDescription">
   <p>This function is not available in the AssetLibrary.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeListeners()">removeListeners</a>(target:LoaderInfo):void</div>
<div class="summaryTableDescription">
   <p>removes listeners to LoaderInfo.</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#replaceItemData()">replaceItemData</a>(name:String, data:*):Boolean</div>
<div class="summaryTableDescription">
   <p>This function is not available in the AssetLibrary.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRELOAD_DONE">PRELOAD_DONE</a> : String = "preload_done"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRELOAD_NEXT">PRELOAD_NEXT</a> : String = "preload_next"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">AssetLibrary</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="data"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">data</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>data:Dictionary</code>&nbsp;&nbsp;[read-write]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get data():Dictionary</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set data(value:Dictionary):void</code>
<br>
</div>
<a name="imagePath"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">imagePath</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>imagePath:String</code>&nbsp;&nbsp;[read-write]<p>
   </p><p>Returns the imagePath if set. If not set, it gets the default
   value from the template.</p>
   <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get imagePath():String</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set imagePath(value:String):void</code>
<br>
</div>
<a name="pages"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">pages</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>pages:Dictionary</code>&nbsp;&nbsp;[read-only]<p>
   </p><p>This returns the dictionary with references for all of 
   the pages loaded into the AssetLibrary.</p>
   <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get pages():Dictionary</code>
<br>
</div>
<a name="template"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">template</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>template:<a href="../../data/AssetData.html">AssetData</a></code>&nbsp;&nbsp;[read-write]<p>
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get template():<a href="../../data/AssetData.html">AssetData</a></code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set template(value:<a href="../../data/AssetData.html">AssetData</a>):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="AssetLibrary()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">AssetLibrary</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function AssetLibrary(newData:XML = null)</code><p>
   </p><p>This class represents the physical decal sheet once it is loaded in. It is 
   made up of pages of graphics (jpg, png, gif) along with a xml template to cut 
   out and map out the images. This should be extended for custom sheets specific 
   to an application. Ideas for extending would be to include the names of decals 
   as constants for correct typing.</p>
   
   <p>I based this off of the stick on decals you would get when building a model 
   airplane. Basically you define a AssetData as an XML file. In the decal 
   there should be 2 main nodes "sheets" and  "decals". Define paths to each 
   sheet in the sheets node. When the AssetLibrary class loads, it will cue up 
   all the sheets, load them, and store references to the loaded Bitmap in a 
   Dictionary called "_pages". You can then look up a decal based on its ID 
   and sheet reference. The AssetData will return the x,y,w,h coordinates 
   and wrap it into a Asset Class.</p>
   
   <p>Requires a AssetData and waits for the template to fire a CHANGE
   event before calling the init. This way you can continue to update the class without
   having to ever destroy it and re-instantiate it. AssetTempalate handles loading all of
   the XML data the AssetLibrary needs to generate Assets.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">newData</span>:XML</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addListeners()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addListeners(target:LoaderInfo):void</code><p>
   </p><p>attaches listeners to LoaderInfo. This is used to streamline the repetitive adding of
   listeners in the preload process.<p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:LoaderInfo</code></td>
</tr>
</table>
</div>
<a name="clone()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clone():<a href="../libraries/ILibrary.html">ILibrary</a></code><p>
   </p><p>This function is not available in the AssetLibrary.</p>
   <p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../libraries/ILibrary.html">ILibrary</a></code></td>
</tr>
</table>
</div>
<a name="getAsset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getAsset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getAsset(id:String):<a href="../../views/display/CamoAsset.html">CamoAsset</a></code><p>
   Returns a cut out decal based on id. This is matched up to the decals part of the xml
   in the Asset Template. The request is made to the template to give back a config file
   to be used in the decal. The config file has the sheet name and a reference to it is
   passed into the decal as a source. The final result is a cut out decal.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">id</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../../views/display/CamoAsset.html">CamoAsset</a></code></td>
</tr>
</table>
</div>
<a name="getItem()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getItem</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getItem(name:String):*</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code></td>
</tr>
</table>
</div>
<a name="getPage()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getPage</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getPage(name:String, clone:Boolean = false):Bitmap</code><p>
   Used to get a cloned bitmap reference to the page's ID.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">clone</span>:Boolean</code> (default = <code>false</code>)<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Bitmap</code></td>
</tr>
</table>
</div>
<a name="hasAsset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">hasAsset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function hasAsset(id:String):Boolean</code><p>
   Verifies that the Asset Exists in the AssetLibrary instance.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">id</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="init()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">init</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function init(event:Event):void</code><p>
   init function creates a new page dictionary, resets the preloader counter and gets the
   total pages to load before calling preload.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code></td>
</tr>
</table>
</div>
<a name="ioError()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ioError</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function ioError(event:IOErrorEvent):void</code><p>
   </p><p>Called when a file can not be loaded. It automatically triggers the next preload.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:IOErrorEvent</code></td>
</tr>
</table>
</div>
<a name="load()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">load</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function load(url:String):void</code><p>
   Routs load call to template instance inside of class. This is done to allow
   protection from directly.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code></td>
</tr>
</table>
</div>
<a name="loadPage()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">loadPage</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function loadPage(url:String):void</code><p>
   Loads a decal sheet page based on its url. Once its loaded, onSheetLoad is triggered.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code></td>
</tr>
</table>
</div>
<a name="onSheetLoad()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">onSheetLoad</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function onSheetLoad(event:Event):void</code><p>
   This is called when page is loaded. A reference to the loaded bitmap is stored in the 
   pages dictionary based on its name. This is used latter to match up the correct source
   sheet for the Asset. After loading, the listeners are removed and preload is recalled
   to continue with the preloading process.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code></td>
</tr>
</table>
</div>
<a name="preload()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">preload</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function preload():void</code><p>
   begins preload by seeing if the counter is lower then the total pages to load. If more
   loading is needed, the preloader calls the loadPage. If preloading is complete, a
   PRELOAD_DONE event is dispatched.
   </p></div>
<a name="register()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">register</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function register(name:String, item:*):*</code><p>
   </p><p>This function is not available in the AssetLibrary.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code></td>
</tr>
</table>
</div>
<a name="removeListeners()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeListeners(target:LoaderInfo):void</code><p>
   </p><p>removes listeners to LoaderInfo. This is used to streamline the remove of listeners 
   from the preload process and frees up memory.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:LoaderInfo</code></td>
</tr>
</table>
</div>
<a name="replaceItemData()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">replaceItemData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function replaceItemData(name:String, data:*):Boolean</code><p>
   </p><p>This function is not available in the AssetLibrary.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">data</span>:*</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="PRELOAD_DONE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRELOAD_DONE</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRELOAD_DONE:String = "preload_done"</code>
</div>
<a name="PRELOAD_NEXT"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRELOAD_NEXT</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRELOAD_NEXT:String = "preload_next"</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
